<?php

class EmailFactory extends AbstractFactory {

    /**
     * Building Email object
     * @param $objRequest  Pass $_POST or $_GET or $_REQUEST
     */
    public static function createEmail($to, $subject, $message) {
        $email = new Email();
        $email->setTo($to);
        $email->setName(IEmail::MAIN_NAME);
        $email->setFrom(IEmail::MAIN_EMAIL);
        $email->setSubject($subject);
        $email->setMessage($message);
        return $email;
    }

}

?>
